package com.tjetc.config;

import com.tjetc.Interceptor.JwtTokenUserInterceptor;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@RequiredArgsConstructor
public class WebConfig implements WebMvcConfigurer {

    private final JwtTokenUserInterceptor jwtTokenUserInterceptor;

  /*  @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(jwtTokenUserInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/user/login", "/user/register")
                .excludePathPatterns("/pass/list", "/pass/districeList", "/pass/findById", "/pass/findAllPass")
                .excludePathPatterns("/city/all", "/city/no")
                .excludePathPatterns("/type/findAllType")
                .excludePathPatterns("/introduce/lookforIntroduceByid1/**", "/introduce/lookforIntroduceByid2/**")
                .excludePathPatterns("/voclcontent/findAllVoclcontent");
    }*/
}
